/*
 *  $Id: DeathGrasp.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Air.Spells {
	public class DeathGrasp : TargetEnchantmentCard<Creature> {
		public DeathGrasp() : base("001_a_s_death_grasp") {
            Level = CompleteLevel.ReadyForTest;
			Version = 0;
			Element = ElementType.Air;
			Value = 100;
			Target = CreatureTarget.Enemy;
			AddManaCost(ElementType.Air, 2);
		}

		protected override EnchantmentAffect CreateEnchantment() {
			return new DeathGraspAffect();
		}

		protected override void DoAction(TargetArgs<Creature> args) {
			base.DoAction(args);
			args.Target.DamageBy(NewDamage(args, 1));
		}

		private class DeathGraspAffect : GraveyardEnchantmentAffect<DeathGrasp> {
			public DeathGraspAffect() {
                Add(new Affects.GraveyardAntimagic());
                Add(new Affects.GraveyardAntimagicArea());
			}

			public override bool Dispellable {
				get { return false; }
			}
		}
	}
}
